#include "exp_4.h"
int main() {
    BinTree t;
    int a[] = { 100,45,43,23,45,12,45,12,4,-10,24,-12};
    make_heap(&t, a, 12, less);
    ElemType e;
    for (int i = 0; i < 12; ++i) {
        pop_heap(&t, &e);
        printf("%d ", e);
    }
    putchar('\n');
    head_clear(&t);
    make_heap(&t, a, 12, greater);
    for (int i = 0; i < 12; ++i) {
        pop_heap(&t, &e);
        printf("%d ", e);
    }
    return 0;
}